objects1= CMd5.o pws.o XDocIndex.o XForwardIndex.o StrTool.o mainForward.o
objects2= XInvertIndex.o mainInvert.o
CC= g++
CFLAGS= 

all:xyzForward xyzInvert

xyzForward:$(objects1)
	$(CC) $(CFLAGS) -o xyzForward  $(objects1) 
xyzInvert: $(objects2)
	$(CC) $(CFLAGS) -o xyzInvert   $(objects2)

CMd5.o: CMd5.cc CMd5.h
	$(CC) $(CFLAGS) -c CMd5.cc
mainForward.o: mainForward.cc config.h XDocIndex.h XForwardIndex.h
	$(CC) $(CFLAGS) -c mainForward.cc
mainInvert.o: mainInvert.cc XInvertIndex.h config.h
	$(CC) $(CFLAGS) -c mainInvert.cc
pws.o: pws.cc pws.h
	$(CC) $(CFLAGS) -c pws.cc
StrTool.o: StrTool.cc StrTool.h
	$(CC) $(CFLAGS) -c StrTool.cc
XDocIndex.o: XDocIndex.cc XDocIndex.h CMd5.h
	$(CC) $(CFLAGS) -c XDocIndex.cc
XForwardIndex.o: XForwardIndex.cc XForwardIndex.h StrTool.h pws.h \
  config.h
	$(CC) $(CFLAGS) -c XForwardIndex.cc
XInvertIndex.o: XInvertIndex.cc XInvertIndex.h
	$(CC) $(CFLAGS) -c XInvertIndex.cc

.PHONY:clean
clean:	
	-rm xyzForward xyzInvert $(objects1) $(objects2)
